﻿using Abp.Application.Services.Dto;
using Abp.Domain.Entities.Auditing;
using System;
using System.ComponentModel;

namespace LpbPrj.Client.Patients.Dtos
{
    public class PatientListDto : EntityDto, IHasCreationTime, INotifyPropertyChanged
    {
        public void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;

        private string _PatientName;
        public string PatientName
        {
            get { return _PatientName; }
            set
            {
                _PatientName = value;
                OnPropertyChanged("PatientName");
            }
        }

        private DateTime? _PatientBirthday;
        public DateTime? PatientBirthday
        {
            get { return _PatientBirthday; }
            set
            {
                _PatientBirthday = value;
                OnPropertyChanged("PatientBirthday");
            }
        }

        private string _PatientBirthdayStr;
        public string PatientBirthdayStr
        {
            get { return _PatientBirthdayStr; }
            set
            {
                _PatientBirthdayStr = value;
                OnPropertyChanged("PatientBirthdayStr");
            }
        }

        private string _PatientAge;
        public string PatientAge
        {
            get { return _PatientAge; }
            set
            {
                _PatientAge = value;
                OnPropertyChanged("PatientAge");
            }
        }

        private string _PatientSexStr;
        public string PatientSexStr
        {
            get { return _PatientSexStr; }
            set
            {
                _PatientSexStr = value;
                OnPropertyChanged("PatientSexStr");
            }
        }

        private SexState _PatientSex;
        public SexState PatientSex
        {
            get { return _PatientSex; }
            set
            {
                _PatientSex = value;
                OnPropertyChanged("PatientSex");
            }
        }

        private string _PatientPhone;
        public string PatientPhone
        {
            get { return _PatientPhone; }
            set
            {
                _PatientPhone = value;
                OnPropertyChanged("PatientPhone");
            }
        }

        private string _PatientAddress;
        public string PatientAddress
        {
            get { return _PatientAddress; }
            set
            {
                _PatientAddress = value;
                OnPropertyChanged("PatientAddress");
            }
        }

        private string _Description;
        public string Description
        {
            get { return _Description; }
            set
            {
                _Description = value;
                OnPropertyChanged("Description");
            }
        }

        private string _Disease;
        public string Disease
        {
            get { return _Disease; }
            set
            {
                _Disease = value;
                OnPropertyChanged("Disease");
            }
        }

        private string _Remarks;
        public string Remarks
        {
            get { return _Remarks; }
            set
            {
                _Remarks = value;
                OnPropertyChanged("Remarks");
            }
        }



        private string _PatientBirthMonth;
        public string PatientBirthMonth
        {
            get { return _PatientBirthMonth; }
            set
            {
                _PatientBirthMonth = value;
                OnPropertyChanged("PatientBirthMonth");
            }
        }

        private string _PatientCheckBirthMonth;
        public string PatientCheckBirthMonth
        {
            get { return _PatientCheckBirthMonth; }
            set
            {
                _PatientCheckBirthMonth = value;
                OnPropertyChanged("PatientCheckBirthMonth");
            }
        }

        private decimal? _PatientBirthWeight;
        public decimal? PatientBirthWeight
        {
            get { return _PatientBirthWeight; }
            set
            {
                _PatientBirthWeight = value;
                OnPropertyChanged("PatientBirthWeight");
            }
        }

        private string _PatientDepartments;
        public string PatientDepartments
        {
            get { return _PatientDepartments; }
            set
            {
                _PatientDepartments = value;
                OnPropertyChanged("PatientDepartments");
            }
        }

        private string _HospitalizationNumber;
        public string HospitalizationNumber
        {
            get => _HospitalizationNumber;
            set
            {
                _HospitalizationNumber = value;
                OnPropertyChanged("HospitalizationNumber");
            }
        }


        private string _Cause;//送检原因
        private string _Doctor;//送检医生
        private string _Operator;//检查员
        private string _CaseID;//病例号
        private string _ShowID;//展示的Id，带有日期的
        public string Cause { get => _Cause; set { _Cause = value; OnPropertyChanged("Cause"); } }
        public string Doctor { get => _Doctor; set { _Doctor = value; OnPropertyChanged("Doctor"); } }
        public string Operator { get => _Operator; set { _Operator = value; OnPropertyChanged("Operator"); } }
        public string CaseID { get => _CaseID; set { _CaseID = value; OnPropertyChanged("CaseID"); } }
        public string ShowID { get => _ShowID; set { _ShowID = value; OnPropertyChanged("ShowID"); } }



        public string CreationDate { get; set; }
        public string CreationDateTime { get; set; }
        public DateTime CreationTime { get; set; }


        public PatientListDto DeepClone()
        {
            return new PatientListDto()
            {
                PatientName = PatientName,
                PatientBirthday = PatientBirthday,
                PatientBirthdayStr = PatientBirthdayStr,
                PatientAge = PatientAge,
                PatientSexStr = PatientSexStr,
                PatientSex = PatientSex,
                PatientPhone = PatientPhone,
                PatientAddress = PatientAddress,
                Description = Description,
                Disease = Disease,
                Remarks = Remarks,
                PatientBirthMonth = PatientBirthMonth,
                PatientCheckBirthMonth = PatientCheckBirthMonth,
                PatientBirthWeight = PatientBirthWeight,
                PatientDepartments = PatientDepartments,
                HospitalizationNumber = HospitalizationNumber,
                CreationDate = CreationDate,
                CreationDateTime = CreationDateTime,
                CreationTime = CreationTime

            };
        }

        public PatientListDto Clone()
        {
            return MemberwiseClone() as PatientListDto;
        }
    }

}
